<?php

include '../controllers/getSet.php';
$setId = $_REQUEST['setId'];
$set = getSetById($setId);
$listeningTopic = $set->listening;
$speakingTopic = $set->speaking;
$readingTopic = $set->reading;
$writingTopic = $set->writing;
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>修改托福机经</title>
<script src="../js/edittopic.js"></script>
</head>
<body>
<a href="javascript:history.back(-1)">返回</a>
<hr />
<script type="text/javascript">
	setId = <?php echo $setId;?>;
	</script>

<table border='2' rules='rows' align="center" cellpadding='8%'>
	<thead>
		<tr align="center">
			<th colspan="2">
			<h1>修改托福机经</h1>
			</th>
		</tr>
	</thead>
	<tr>
		<td colspan="2" style='background-color: gray; height: 30px;'></td>
	</tr>
	<tr align="center">
		<td>标题</td>
		<td><input type="text" size="100" id="title"
			value=<?php echo $set->name;?>></input> <input type="hidden"
			size="100" id="setId" value=<?php echo $set->setId;?>></input> <input
			type="button" value="修改标题"
			onclick="updateSetInfo(<?php echo $setId;?>);"></td>
	</tr>
	<tr>
		<td colspan="2" style='background-color: gray; height: 10px;'></td>
	</tr>
	<tr align="center">
		<td colspan="2"><b>听力</b></td>
	</tr>
	<tr align="center">
		<td>摘要</td>
		<td><input type="text" size="120"
			value="<?php echo $listeningTopic->title;?>" id="listeningSummary"></input></td>
	</tr>
	<tr align="center">
		<td colspan="2"><input type="hidden" size="100" id="listeningId"
			value="<?php echo $listeningTopic->topicId;?>"></input> <input
			id="listeningContent" name="listeningContent" style="display: none"
			value="<?php echo $listeningTopic->content;?>" /> <iframe id="Editor"
			name="Editor" src="../editor/editor.html?Id=listeningContent"
			frameBorder="0" marginHeight="0" marginWidth="0" scrolling="no"
			style="height: 350px; width: 100%"> </iframe></td>
	</tr>
	<tr align="center">
		<td colspan="2">
		<div id="listeningDiv"><input type="button" value="修改听力"
			onclick="updateListening();"></input> <input type="button"
			value="删除听力"
			onclick="deleteTopic(1,<?php echo $listeningTopic->topicId;?>, <?php echo $setId;?>);"></input></div>
		</td>
	</tr>

	<tr>
		<td colspan="2" style='background-color: gray; height: 10px;'></td>
	</tr>
	<tr align="center">
		<td colspan="2"><b>口语</b></td>
	</tr>
	<tr align="center">
		<td>摘要</td>
		<td><input type="text" size="120"
			value="<?php echo $speakingTopic->title;?>" id="speakingSummary"></input></td>
	</tr>
	<tr align="center">
		<td colspan="2"><input type="hidden" size="100" id="speakingId"
			value=<?php echo $speakingTopic->topicId;?>></input> <input
			id="speakingContent" name="speakingContent" style="display: none"
			value="<?php echo $speakingTopic->content;?>" /> <iframe id="Editor"
			name="Editor" src="../editor/editor.html?Id=speakingContent"
			frameBorder="0" marginHeight="0" marginWidth="0" scrolling="no"
			style="height: 350px; width: 100%"></iframe></td>
	</tr>

	<tr align="center">
		<td colspan="2">
		<div id="speakingDiv"><input type="button" value="修改口语"
			onclick="updateSpeaking();"></input> <input type="button"
			value="删除口语"
			onclick="deleteTopic(2,<?php echo $speakingTopic->topicId;?>, <?php echo $setId;?>);"></input></div>
		</td>
	</tr>

	<tr>
		<td colspan="2" style='background-color: gray; height: 10px;'></td>
	</tr>
	<tr align="center">
		<td colspan="2"><b>阅读</b></td>
	</tr>
	<tr align="center">
		<td>摘要</td>
		<td><input type="text" size="120"
			value="<?php echo $readingTopic->title;?>" id="readingSummary"></input></td>
	</tr>
	<tr align="center">
		<td colspan="2"><input type="hidden" size="100" id="readingId"
			value=<?php echo $readingTopic->topicId;?>></input> <input
			id="readingContent" name="readingContent" style="display: none"
			value="<?php echo $readingTopic->content;?>" /> <iframe id="Editor"
			name="Editor" src="../editor/editor.html?Id=readingContent"
			frameBorder="0" marginHeight="0" marginWidth="0" scrolling="no"
			style="height: 350px; width: 100%"></iframe></td>
	</tr>

	<tr align="center">
		<td colspan="2">
		<div id="readingDiv"><input type="button" value="修改阅读"
			onclick="updateReading();"></input> <input type="button" value="删除阅读"
			onclick="deleteTopic(3,<?php echo $readingTopic->topicId;?>, <?php echo $setId;?>);"></input></div>
		</td>
	</tr>

	<tr>
		<td colspan="2" style='background-color: gray; height: 10px;'></td>
	</tr>
	<tr align="center">
		<td colspan="2"><b>写作</b></td>
	</tr>
	<tr align="center">
		<td>摘要</td>
		<td><input type="text" size="120"
			value="<?php echo $writingTopic->title;?>" id="writingSummary"></input></td>
	</tr>
	<tr align="center">
		<td colspan="2"><input type="hidden" size="100" id="writingId"
			value=<?php echo $writingTopic->topicId;?>></input> <input
			id="writingContent" name="writingContent" style="display: none"
			value="<?php echo $writingTopic->content;?>" /> <iframe id="Editor"
			name="Editor" src="../editor/editor.html?Id=writingContent"
			frameBorder="0" marginHeight="0" marginWidth="0" scrolling="no"
			style="height: 350px; width: 100%"></iframe></td>
	</tr>

	<tr align="center">
		<td colspan="2">
		<div id="writingDiv"><input type="button" value="修改写作"
			onclick="updateWriting();"></input> <input type="button" value="删除写作"
			onclick="deleteTopic(4,<?php echo $writingTopic->topicId;?>, <?php echo $setId;?>);"></input></div>
		</td>
	</tr>

	<tr>
		<td colspan="2" style='background-color: gray; height: 30px;'></td>
	</tr>
	<tr align="center">
		<td colspan="2"><a href="javascript:history.back(-1)">返回</a>

		<hr />
		</td>
	</tr>
</table>
</body>
</html>
